# Copyright (c) SandboxAQ. All rights reserved.
# SPDX-License-Identifier: AGPL-3.0-only

load("//common/rules/mkdocs:rules.bzl", "mkdocs_tree")
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@io_bazel_rules_go//go:def.bzl", "go_binary")

mkdocs_tree(
    name = "mkdocs",
    srcs = [
        "main.go",
    ],
    path = "examples/go/echo_tls_server",
    visibility = ["//docs:__subpackages__"],
)

go_binary(
    name = "echo_tls_server",
    srcs = ["main.go"],
    data = [
        "//testdata",
    ],
    deps = [
        "//go:sandwich",
        "//go/io",
        "//go/tunnel",
        "//proto:sandwich_go_proto",
        "//proto/api/v1:api_go_proto",
    ],
)

build_test(
    name = "echo_tls_server_test",
    targets = [":echo_tls_server"],
)
